import Login from "../pages/login";
import Entry from "../pages/entry";
import NotFoundComponent from "../pages/notFoundComponent";
import Result from "../pages/result"; // 评审结果
import Trends from "../pages/trends"; // 最新动态【通知公告】
import File from "../pages/file"; // 申报文件
import Guide from "../pages/guide"; // 申报指导【材料示范】
import HomePage from "../pages/homePage/homePage"; // 首页
import ApplyList from "../pages/apply/index"; // 申报列表
import Profile from "../pages/profile"; // 个人中心
import Mesaage from "../pages/message"; // 消息列表
import MessageDetail from "../pages/messageDetail"; // 消息详情

const routes = [
  {
    path: '/',
    redirect: '/home',
  },
  {
    path: "/index",
    component: Login
  },
  {
    path: "/entry",
    component: Entry,
  },
  {
    path: "/result",
    component: Result
  },
  {
    path: "/trends",
    component: Trends
  },
  {
    path: "/file",
    component: File
  },
  {
    path: "/home",
    component: HomePage
  },
  {
    path: "/apply",
    component: ApplyList
  },
  {
    path: "/guide",
    component: Guide
  },
  {
    path: "/profile",
    component: Profile
  },
  {
    path: "/message",
    component: Mesaage
  },
  {
    path: "/messageDetail",
    component: MessageDetail
  },
  { path: "*", component: NotFoundComponent }, //页面404
  
]


export default {
  mode: 'hash',
  routes,
  scrollBehavior(to, from, savedPosition) {
    if (savedPosition) {
      return savedPosition
    } else {
      return { x: 0, y: 0 }
    }
  }
}

